<?php
/**
 * Created by PhpStorm.
 * User: ZZF
 * Date: 2017/3/16
 * Time: 11:36
 */

namespace app\admin\model;
use think\Model;
use think\Verify;
class BusinessesModel extends Model{
	protected $validate = [
         'rule' => [
			 'name' => "require|unique:businesses|length:1,32"
		 ],
         'msg'  => [
			 'username.require' => "商家名称必须填写！",
			 'username.unique' => "商家名称已存在！",
			 'username.length' => "商家名称长度必须不少于1且不超过32"
		 ]
    ];

    public function check_verify(){
        $verify = new Verify();
        return $verify->check(input('verify'));
    }
}
